Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Mustufa Baig 5 posts 25 karma points
    Aug 29, 2010 @ 23:12
    Mustufa Baig
    0

    Add to Basket: [catalog does not exists]

    I have been trying to develop my own version of ucommerce demo where I have created a catalog, bound it to a host name, able to create pages where i can successfully pull and present categories, category products and product description pages. But when i try to add product to basket then i can get following error:

    [The catalog 'dymo' does not exist.] [No basket exist for the current user.]

    I am using AddToBasket[XSLT].xslt which comes as part of demo uCommerce store to add product to basket. The site running running umbraco 4.5 on IIS7. I already tired the following solutions which i found on this forum but nothing seems to make a difference:

    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true">

    I checked very thoroughly the host name binding with the catalog plus also tried the following from usercontrol but i got the same error:

    SiteContext.CatalogContext.CurrentCatalogName = "MyCatalog";
    Library.AddToBasket(string catalogName, int quantity, string sku, string variantSku);

    I am able browse the catalog it just fails when try to add to basket.

    Let me know what else can I try to get this thing working. Thanks

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 30, 2010 @ 10:20
    Søren Spelling Lund
    0

    Hi Mustafa,

    Are you getting any additional information in umbracoLog?

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 30, 2010 @ 10:21
    Søren Spelling Lund
    0

    Also which version of uCommerce are you running?

  • Mustufa Baig 5 posts 25 karma points
    Sep 03, 2010 @ 01:16
    Mustufa Baig
    0

    Hi there: Sory for replying so late as i was expecting an email notification but i did not get one. Even though I subsribed to notifications.

    I checked the umbraco logs just after trying to add a product into the basket but do not see any activity. Do I need to enable debugging? How?

    I am running 1.0.4.2

    Thanks

    Mustufa

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 03, 2010 @ 09:22
    Søren Spelling Lund
    0

    Hi Mustafa,

    uCommerce determines which catalog group (store) and catalog it is currently by looking at the query string, e.g. www.mystore.com/shop.aspx?catalog=MyCatalog. If you make sure to carry the catalog=MyCatalog around in the URLS (like the demo store does) you should be fine.

    As you've found out you can override this by setting SiteContext.Current.CatalogContext.CurrentCatalogName = "MyCatalog"; For that to work you need to set it as the first thing on your page before any calls are made to other APIs.

    Alternative you can make sure that the customer basket is generated from a page that has the catalog information available by calling CommerceLibrary:GetBasket() on the page and then the AddToBasket and a subsequent page.

  • Mustufa Baig 5 posts 25 karma points
    Sep 04, 2010 @ 06:06
    Mustufa Baig
    0

    Hi Soren

    Even though the method CommerceLibrary:AddToBasket() takes in catalog name as parameter, I still need to make sure that the ?catalog=MyCatalog querystring is present. Am I understanding it right?

    Thanks

    Mustufa

  • Mustufa Baig 19 posts 41 karma points
    Sep 05, 2010 @ 00:55
    Mustufa Baig
    0

    Hi Soren

    I am hard coding the catalog name when calling CommerceLibrary:AddToBasket() method but still does not work unless ucommerce need catalog info as query parameter. Is this true?

    Thanks

    Mustufa

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 07, 2010 @ 09:52
    Søren Spelling Lund
    0

    You'll have to have the catalog name be part of the URL, yes, or you can override the catalog by setting a new catalog name on the context. One thing of interest is that the catalog needs to be part of the store configured for the root URL you're using.

    Say you have

    SiteA.com

    - MyFirstCatalog

    - MySecondCatalog

    SiteB.com

    - MyThirdCatalog

    If you're on SiteA.com you can't actually set MyThirdCatalog as that will give you the error you describe. Only MyFirstCatalog and MySecondCatalog are valid for SiteA. The reason for this is security between stores so you don't get your catalogs mixed.

    Hope this helps.

  • Mustufa Baig 19 posts 41 karma points
    Sep 13, 2010 @ 04:24
    Mustufa Baig
    1

    Hi Soren

    Finally I was able to find out the issue which was causing the catalog I was refering to not found.

    When I installed ucommerce it created ucommerce.dk catalog. Then I created my new catalog group. And then I mapped the host name to my new catalog group which was previously mapped to ucommerce.dk catalog group. So there were two catalog groups mapped to same host which was causing catalog not found because it was looking at the first catalog group which was ucommerce.dk

    Thanks for the help all the way.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 13, 2010 @ 08:09
    Søren Spelling Lund
    0

    Hi Mustafa,

    Glad to hear. Sorry I couldn't be of more help. Could you mark the topic as resolved please? Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft